﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.Specialized;

namespace CloudTrace
{
    internal static class Util
    {
        #region helpers
        public static StringDictionary ParseInitData(string initializeData)
        {
            StringDictionary dictionary = new StringDictionary();
            string[] initData = initializeData.Split(',', ';');

            foreach (string item in initData)
            {
                string[] data = item.Split(new char[] { '=' }, 2);
                if (data.Length != 2)
                    continue;
                dictionary.Add(data[0], data[1]);
            }

            return dictionary;
        }
        #endregion

    }
}
